/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ucb.ProjetoFinal.domain;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author DCBorges
 */
@Entity
@Table(name = "sdctb006_ssta_psqa")
public class SistemaPesquisa implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_SQNCL_SISTEMA")
    private Short nuSqnclSistema;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "NO_SISTEMA")
    private String noSistema;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 12)
    @Column(name = "SG_SISTEMA")
    private String sgSistema;
    @Column(name = "QT_DIAS_VALIDADE")
    private Short qtDiasValidade;
    @Column(name = "QT_DIA_ESPERA")
    private Short qtDiaEspera;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sistemaPesquisa")
    private List<PesquisaCadastral> pesquisaCadastralList;

    public SistemaPesquisa() {
    }

    public SistemaPesquisa(Short nuSqnclSistema) {
        this.nuSqnclSistema = nuSqnclSistema;
    }

    public SistemaPesquisa(Short nuSqnclSistema, String noSistema, String sgSistema) {
        this.nuSqnclSistema = nuSqnclSistema;
        this.noSistema = noSistema;
        this.sgSistema = sgSistema;
    }

    public Short getNuSqnclSistema() {
        return nuSqnclSistema;
    }

    public void setNuSqnclSistema(Short nuSqnclSistema) {
        this.nuSqnclSistema = nuSqnclSistema;
    }

    public String getNoSistema() {
        return noSistema;
    }

    public void setNoSistema(String noSistema) {
        this.noSistema = noSistema;
    }

    public String getSgSistema() {
        return sgSistema;
    }

    public void setSgSistema(String sgSistema) {
        this.sgSistema = sgSistema;
    }

    public Short getQtDiasValidade() {
        return qtDiasValidade;
    }

    public void setQtDiasValidade(Short qtDiasValidade) {
        this.qtDiasValidade = qtDiasValidade;
    }

    public Short getQtDiaEspera() {
        return qtDiaEspera;
    }

    public void setQtDiaEspera(Short qtDiaEspera) {
        this.qtDiaEspera = qtDiaEspera;
    }

    public List<PesquisaCadastral> getPesquisaCadastralList() {
        return pesquisaCadastralList;
    }

    public void setPesquisaCadastralList(List<PesquisaCadastral> pesquisaCadastralList) {
        this.pesquisaCadastralList = pesquisaCadastralList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nuSqnclSistema != null ? nuSqnclSistema.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SistemaPesquisa)) {
            return false;
        }
        SistemaPesquisa other = (SistemaPesquisa) object;
        if ((this.nuSqnclSistema == null && other.nuSqnclSistema != null) || (this.nuSqnclSistema != null && !this.nuSqnclSistema.equals(other.nuSqnclSistema))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ucb.ProjetoFinal.domain.SistemaPesquisa[ nuSqnclSistema=" + nuSqnclSistema + " ]";
    }
    
}
